<?php

class Application_Model_AssocObjImg 
{
	protected $_objimgId;
	protected $_objectId;
	protected $_imageId;
	
	
	
	public function __construct(array $options = null)
	{
		if (is_array($options)) {
			$this->setOptions($options);
		}
	}
	
	public function __set($name, $value)
	{
		$method = 'set' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid Assoc object image property');
		}
		$this->$method($value);
	}
	
	public function __get($name)
	{
		$method = 'get' . $name;
		if (('mapper' == $name) || !method_exists($this, $method)) {
			throw new Exception('Invalid Assoc object image property');
		}
		return $this->$method();
	}
	
	public function setOptions(array $options)
	{
		$methods = get_class_methods($this);
		foreach ($options as $key => $value) {
			$method = 'set' . ucfirst($key);
			if (in_array($method, $methods)) {
				$this->$method($value);
			}
		}
		return $this;
	}
	
	/**
	 * @return the $_objimgId
	 */
	public function getObjimgId() {
		return $this->_objimgId;
	}
	
	/**
	 * @param field_type $_objimgId
	 */
	public function setObjimgId($_objimgId) {
		$this->_objimgId = $_objimgId;
	}
	
	
	/**
	 * @return the $_objectId
	 */
	public function getObjectId() {
		return $this->_objectId;
	}
	
	/**
	 * @return the $_imageId
	 */
	public function getImageId() {
		return $this->_imageId;
	}
	
	/**
	 * @param field_type $_objectId
	 */
	public function setObjectId($_objectId) {
		$this->_objectId = $_objectId;
	}
	
	/**
	 * @param field_type $_imageId
	 */
	public function setImageId($_imageId) {
		$this->_imageId = $_imageId;
	}
	
}